<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>跑马灯</title>
</head>
<body>

<div id="app">

    <input type="text" v-model="search.key">
    <input type="text" v-model="search.key2">

</div>


<script src="./node_modules/vue/dist/vue.js"></script>
<script>
    let mv = new Vue({
        el: "#app",
        data: {
            birthday: 1565588398790,
            search: {
                key: "",
                key2:""
            }

        },
        methods: {
            getBirth() {
                console.log("getBirth");
                let date = new Date(this.birthday);
                return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDay()
            }
        },
        computed: {}
        ,
        watch: {
           search:{
               deep: true,
               handler(val){
                   console.log(val.name);
               }

           }
        }
    })


</script>


</body>
</html>